<?php
header('content-type:text/html;charset=utf-8');
include 'functions.php';


$preg = '/\d+?\.(jpg|gif|png)/';
$str = "12.jpg-333.gif-55555.png-1111.bmp";

preg_match_all($preg,$str,$arr);
p($arr);